package com.hq.ims.data.entityenum;


import com.hq.web.penum.IBaseEnum;

/**
 * 账号状态
 */
public enum EnumBusiInfoOrder implements IBaseEnum {

    PublishTimeDesc(0, "发布时间倒序","publish_time desc"),
    PublishTimeAsc(1, "发布时间升序","publish_time asc"),
    CreateDateDesc(2, "创建时间倒序","create_date_time desc"),
    CreateDateAsc(3, "创建时间升序","create_date_time asc"),
    ;

    private final int code;
    private final String typeName;

    private final String sql;
    EnumBusiInfoOrder(int code, String typeName,String sql) {
        this.code = code;
        this.typeName = typeName;
        this.sql = sql;
    }

    /**
     * 根据int类型转换枚举类
     *
     * @param x
     * @return com.hq.data.entityenum.EntityEnumAccountStatus
     */
    public static EnumBusiInfoOrder getByInt(int x) {
        for (EnumBusiInfoOrder value : values()) {
            if (value.code == x) {
                return value;
            }
        }
        return null;
    }

    @Override
    public int getCode() {
        return code;
    }

    public String getTypeName() {
        return typeName;
    }

    public String getSql() {
        return sql;
    }

    @Override
    public String getValue() {
        return typeName;
    }
}
